package week3;



public class Point {

	//Member variables are visible within the whole class.
	double x,y;

	
	//this is my constructor for Point class
	public Point(double x, double y){
	
		this.x = x;	
		this.y = y;
	
	}
	
	//Getters and Setters
	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}
	
	//customized toString
	
	public String toString() {
		return "(" + x + " , " + y + ")";
	}

	// gets distance between reference point and user-entered new point
	public double getDistance(Point userPoint){
			double dist;
			dist = Math.sqrt(((Math.pow((userPoint.x-x), 2)+Math.pow((userPoint.y-y), 2))));
			return dist;
	}


	
	
	
	
	
		
	
		
		
	}


